from urllib.error import URLError
from urllib.request import ProxyHandler,build_opener
proxy_handler=ProxyHandler({
    'http': 'http://127.0.0.1:9742',
    'https': 'https://127.0.0.1:9742'
})
opener = build_opener(proxy_handler)
try:
    requests=opener.open('https://zanlaojiacanyin.com')
    print(requests.read().decode('utf-8'))
except URLError as e:
    print(e.reason)